package com.cq.hd.member.service;

import com.cq.hd.common.pagination.Page;
import com.cq.hd.member.api.dto.*;
import com.cq.hd.member.api.vo.*;
import com.cq.hd.member.po.TbMerchantPo;
import com.baomidou.mybatisplus.extension.service.IService;

import java.math.BigDecimal;
import java.util.List;

/**
 * <p>
 * 商户表 服务类
 * </p>
 *
 * @author mYunYu
 * @since 2023-11-21
 */
public interface TbMerchantService extends IService<TbMerchantPo> {

    Page<MerchantPageVo> pageMerchant(MerchantPageDto merchantPageDto);

    AdminMerchantPageVo details(Long id);

    Page<RelationBusinessPageVo> pageRelationBusiness(RelationBusinessPageDto relationBusinessPageDto);

    MerchantVo getByMobile(String mobile);

    MerchantVo getMerchantById(long id);

    Boolean updateMerchant(MerchantUpdateDto merchantUpdateDto);

    Page<AppMerchantPageVo> pageAppMerchant(AppMerchantPageDto appMerchantPageDto);

    AppMerchantDetailVo detailAppMerchant(AppMerchantDetailDto appMerchantDetailDto);

    List<MerchantPageVo> listMerchantByIds(List<String> ids);

    MerchantVo getByOpenId(String openid);

    Boolean updateCustomInfo(MerchantCustomUpdateDto merchantCustomUpdateDto);

    Boolean updatePwd(MerchantPwdUpdateDto merchantPwdUpdateDto);

    Integer getNewCountByDate(String startTime, String endTime);

    List<MerchantDetailVo> listDetailByIds(List<Long> merchantIds);

    Boolean addMerchantAmt(MerchantAmtAddDto merchantAmtAddDto);

    MerchantDetailVo getDetailById(Long id);

    int subMerchantSubsidyAmt(Long userId, BigDecimal tradeAmt);

    int subMerchantAmt(Long userId, BigDecimal tradeAmt);

    Boolean updateBankCard(MerchantBankCardDto merchantBankCardDto);

    MerchantBankCardVo getBankCard(Long merchantId);

}
